﻿using System;
using System.Net;
using System.Net.Sockets;

namespace Narwhunderful.Aphelia.Framework.Net
{

    public class NarsockConnectionRequestEventArgs : EventArgs
    {

        bool _cancel = false;
        public bool Cancel
        {
            get
            { 
                return _cancel;
            }
            set
            { 
                _cancel = value; 
            }
        }

        Socket _socket;
        public Socket ClientSocket
        {
            get
            {
                return _socket;
            }
        }

        public string ClientIP
        {
            get
            {
                IPEndPoint rEP = (IPEndPoint)_socket.RemoteEndPoint;
                return rEP.Address.ToString();
            }
        }

        public NarsockConnectionRequestEventArgs(Socket newclient)
        {
            _socket = newclient;
        }

    }

}
